package constructor;

public class text {
    public static void main(String[] args) {
        //认识构造器，掌握构造器的特点，应用场景，注意事项
        Student s = new Student();//这里直接执行得到的时  无参数构造器被执行啦

        Student s2 = new Student("波仔",254);//字符串类型得用双引号不然没用
        //这里得到的结果就是有参数的构造器被执行啦
        System.out.println(s2.name);
        System.out.println(s2.score);


        System.out.println("-------------------------------------");

        Teacher t = new Teacher();
    }
}
